﻿using System;
using System.Web.Security;
using System.Web.UI.WebControls;
using Micronet.OpenWeb.Com.BLL;
using Micronet.OpenWeb.Com.Controls;
using Micronet.OpenWeb.Common;
using Micronet.OpenWeb.Entity;
using Micronet.OpenWeb.Utils;
using Micronet.OpenWeb.Com;
using Telerik.Web.UI;

namespace Micronet.OpenWeb.OpenWeb.Admin.Views.Shared.OpenCommunity
{
    public partial class UserInCommunityProfilesAdmin : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {

            Membership.ValidateUser("openhome", "1234567!@#");
            FormsAuthentication.SetAuthCookie("openhome", true);



            Response.Write(OwUsersInCommunityProfilesBLL.OwGetAll(null, null, null, null).Count);

            if (OwConstants.QueryString.ID.OwQsIsExist())
            {
                OwDv.DefaultMode = DetailsViewMode.Edit;
            }
            else
            {
                OwDv.DefaultMode = DetailsViewMode.Insert;
            }


        }

        protected void OwGrid_ItemDataBound(object sender, GridItemEventArgs e)
        {





        }
        protected void OwCommunityUserPositionsCbb_Init(object sender, EventArgs e)
        {

            OwComboBox cbb = sender as OwComboBox;

            cbb.OwDataSourceBindFromType<OwEnum.CommunityUserPositions>(useLanguage: false);

        }

    }
}